The present invention relates to a data retrieval method in a data structure which can constitute, e.g., database or an artificial intelligence, and a method of adding link-information data to a data string of the data structure.
A variety of databases are practically used at present, and above all, a relational database is the most widely used. A variety of data are stored in a database, and data stored in the database is retrieved by various methods.
With reference to an example in which each of concept names such as DESK, PENCIL, WOOD, GRAPHITE, MICA and BRUSH OF MOTOR consists of element names as shown in the following Table 1, and in a record, the concept name is stored in a concept field and element name(s) is/are stored in element field(s), the outline of a conventional relational database will be explained below. In Table 1, numerals show record numbers, and alphabets show element field numbers.
In the relational database, a new record relationship can made by deriving the relationship of X{Z} on the basis of a combination of two records of X{. . . , Y, . . . } and Y { . . . , Z, . . . }. A capital letter located before the brace "{" stands for a concept name, and capital letters in the braces "{ }" stand for element names. For example, concept name "DESK" and element name "COMBUSTIBILITY" can be combined as
DESK{COMBUSTIBILITY} PA1 DESK{WOOD, . . . } PA1 WOOD {. . . , COMBUSTIBILITY, . . . }. PA1 each data string DS.sub.-- 1 having PA1 each data string DS.sub.-- 1 having PA1 each data string DS.sub.-- 1 having PA1 (a) inputting a data identification name corresponding to data to be retrieved, PA1 (b) extracting a data string on the basis of link-information data stored in an element data storage area of a data string whose data identification name storage area stores the same data identification name as the data identification name to be retrieved, and further extracting a data string on the basis of link-information data stored in an element data storage area of the extracted data string until the element data storage area of the extracted data string is empty, PA1 (c) extracting a data string on the basis of link-information data stored in the parent data storage area of the extracted data string whose element data storage area is empty, from among the data strings extracted in the step (b), and further extracting a data string on the basis of link-information data stored in a parent data storage area of the extracted data string until the parent data storage area of the extracted data string is empty, and PA1 (d) outputting the extracted data string. PA1 each data string DS.sub.-- 1 having PA1 each data string DS.sub.-- 1 having PA1 each data string DS.sub.-- 1 having PA1 (e') adding no link-information data when the element data storage area of the data string DS.sub.-- P extracted in the step (d) has link-information data about the data string DS.sub.-- I extracted in the step (c), PA1 (f') extracting a data string on the basis of link-information data stored in the element data storage area of the data string DS.sub.-- I extracted in the step (c) when the element data storage area of the data string DS.sub.-- P extracted in the step (d) has no link-information data about the data string DS.sub.-- I extracted in the step (c), and further extracting a data string on the basis of the link-information data stored in the element data storage area of the extracted data string until the element data storage area of the extracted data string is empty, PA1 (g') adding no link-information data when any one of the data strings extracted in the step (f') is in agreement with the data string DS.sub.-- P extracted in the step (d) and PA1 (h') storing link-information data about the data string DS.sub.-- P extracted in the step (d) in the parent data storage area of the data string DS.sub.-- I extracted in the step (c) when none of the data strings extracted in the step (f') is in agreement with the data string DS.sub.-- P extracted in the step (d). PA1 each data string DS.sub.-- 1 having PA1 (e') adding no link-information data when the parent data storage area of the data string DS.sub.-- E extracted in the step (d) has link-information data about the data string DS.sub.-- I extracted in the step (c), PA1 (f') extracting a data string on the basis of link-information data stored in the element data storage area of the data string DS.sub.-- E extracted in the step (d) when the parent data storage area of the data string DS.sub.-- E extracted in the step (d) has no link-information data about the data string DS.sub.-- I extracted in the step (c), and further extracting a data string on the basis of link-information data stored in the element data storage area of the extracted data string until the element data storage area of the extracted data string is empty, PA1 (g') adding no link-information data when any one of the data strings extracted in the step (f') is in agreement with the data string DS.sub.-- I extracted in the step (c), and PA1 (h') storing link-information data about the data string DS.sub.-- E extracted in the step (d) in the element data storage area of the data string DS.sub.-- I extracted in the step (c) when none of the data strings extracted in the step (f') is in agreement with the data string DS.sub.-- I extracted in the step (c).
on the basis of a combination of records of
and
TABLE 1 __________________________________________________________________________ Record Concept Element Field No. Field A B C D E F G H I __________________________________________________________________________ 1 desk wood office furniture supplies 2 pencil wood insulator combusti- conducti- softness black office writing cylindri- bility bility color supplies tools cal form 3 wood insulator combusti- plant specific bility gravity of 1 or less 4 graphite conducti- softness black bility color 5 mica insulator 6 brush of conducti- softness black motor bility color __________________________________________________________________________
For convenience' sake, record "X" refers to a record in which concept name "X" is stored in the concept field.
In the relational database, for obtaining a piece of information that element name of "COMBUSTIBILITY" can be included in concept name "DESK", i.e., for combining record "X" including element name "Y" with record "Y" including element name "Z", it is necessary to know the number of the element field containing element name "Y" in record "X". In the example shown in Table 1, for example, it is necessary to know element name of "WOOD" is stored in element field number A of record number 1. However, the number of the element field containing element name "Y" is not always known. It is therefore necessary to combine all the element fields of record X with the concept fields of other records. However, the above operation requires enormous processing when the records and element fields increase in number. For preventing the above situation, there might be a method in which one record consists of one concept field and one element field, and the element field of the record is combined with the concept field of other records. However, not only a great number of records are required, but also it is required to input one concept name in each concept field of a great number of records.
In the relational database, further, when element name "COMBUSTIBILITY" is retrieved without combining records, record "PENCIL" and record "WOOD" are extracted. That is, a directly related concept name can be extracted. However, since the record "DESK" includes element name "WOOD" but the record "DESK" does not include element name "COMBUSTIBILITY" in its element field, it is impossible to make out a piece of information that record "DESK" can include element name "COMBUSTIBILITY". That is, an indirect related concept name can not be extracted. In the relational database, therefore, it is required to input element name "COMBUSTIBILITY" to the element field of the record "DESK". That is, the problem is that one "element name" is required to be inputted in an element field of each of a plurality of records. Further, it is required to input a number of element names in element fields in records having certain concept names. In another solution, all the element fields can be combined with all concept fields. However, it is required to retrieve huge data made by the above combinations, and it is not known which element field has the element name to be retrieved. It is therefore necessary to retrieve all the element fields.
In the relational database, further, it is impossible to prevent the occurrence of circulating definitions of A{B}, B{C} and C{A}. If the records having a state of the circulating definition are allowed to be present, an endless loop takes place in the retrieval.
In the relational database, further, original data are generally arrayed in the form of a two-dimensional table. Each column corresponds to a concept field and an element field containing fixed data of the same kind, and data are classified in advance and inputted to corresponding fields. The relational database is therefore not suitable for expressing a case where an element of an indefinite number such as concept name "PENCIL" is included and the attributes of data to be inputted in element fields are not classified.
In the above-explained relational database, the concept field is placed in the same table, while the above is also true of a case where one table is made from one concept.